Skip to content

Run UI comm on the R thread#1099

Open
lionel- wants to merge 3 commits intomainfrom
task/sync-ui-comm
Open

Run UI comm on the R thread#1099
lionel- wants to merge 3 commits intomainfrom
task/sync-ui-comm

Conversation

@lionel-
Copy link
Contributor

@lionel- lionel- commented Mar 10, 2026

Progress towards #689

  • UI comm now accessible via Console::ui_comm(). It returns an optional reference to a UI comm view with methods to send UI comm events or requests. If the option is None, the UI comm is not connected. If it's Some().

  • The Console::try_ui_comm() variant returns a Result and is nice for easy propagation of errors when the UI comm is expected.

  • Since the UI comm is frontend-initiated, added CommOpen plumbing. You were right to call out the complicated-looking factory handler, it was not necessary (and I can't think of a reason for it to be necessary with other comms).

  • The continuation prompt field has been removed from PromptInfo. We now refresh the prompt from the handle_environment() comm method, and fetch getOption("continue") from there.

  • Fixes the busy/idle race condition, and makes the tests both simpler, more robust, and more exhaustive.

@lionel- lionel- requested a review from DavisVaughan March 11, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant